<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximun-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="assets/mui/css/mui.min.css">
    <link rel="stylesheet" href="assets/FontAwesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/detail.css">
    <title>乐淘商城</title>
</head>
<!-- http://127.0.0.1:3000/mobilenew/detail.html -->

<!-- http://127.0.0.1:3000/m/detail.html -->

<body>

    <!-- 头部区域 -->
    <header id="header" class="mui-bar mui-bar-nav my-header ">
        <h1 class="mui-title">商品详情</h1>
        <a class="mui-icon mui-icon-left-nav mui-pull-left color_white" href="javascript:history.back()"></a>
    </header>

    <div class="mui-content">
        <div class="container" id="detailInfo">
            <!-- <div class="mui-slider">
                <div class="mui-slider-group mui-slider-loop">  -->
            <!--支持循环，需要重复图片节点-->
            <!-- <div class="mui-slider-item mui-slider-item-duplicate">
                <a href="#"><img src="images/detail.jpg "></a>
            </div>
            <div class="mui-slider-item">
                <a href="#"><img src="images/detail.jpg " /></a>
            </div>
            <div class="mui-slider-item">
                <a href="#"><img src="images/detail.jpg " /></a>
            </div>
        </div>

        <!-- 点点点控制器 -->
            <!-- <div class="mui-slider-indicator">
            <div class="mui-indicator mui-active"></div>
            <div class="mui-indicator"></div>

        </div>
    </div>
    <p class="title">1111111111111111111111111111111</p>
    <div class="price">
        价格：
        <span class="newPrice">￥111</span>
        <span class="oldPrice">￥111</span>
    </div>
    <div class="code">
        尺码：
        <span class="item">11</span>
        <span class="item">11</span>
        <span class="item">11</span>
        <span class="item">11</span>
        <span class="item">11</span>
        <span class="item">11</span>
    </div>
    <div class="num">
        数量：
        <main>
            <span id="minus">-</span>
            <input type="text" id="num" value="1">
            <span id="plus">+</span>
        </main>
        <span class="margin">剩余：20件</span>
    </div>
    <div class="operate">
        <div class="cart">
            <a href="#" class="fa fa-shopping-cart"></a>
        </div>
        <div class="btns">
            <span class="addCart">加入购物车</span>
            <a class="buy" href="#">立即购买</a>
        </div>

    </div> -->

        </div>

    </div>

    <!-- 底部区域 -->
    <nav class="mui-bar mui-bar-tab">
        <a class="mui-tab-item " href="index.html">
            <span class="mui-icon mui-icon-home "></span>
            <span class="mui-tab-label">首页</span>
        </a>
        <a class="mui-tab-item" href="category.html">
            <span class="mui-icon mui-icon-email mui-active"></span>
            <span class="mui-tab-label">分类</span>
        </a>
        <a class="mui-tab-item" href="login.html">
            <span class="mui-icon mui-icon-contact"></span>
            <span class="mui-tab-label">购物车</span>
        </a>
        <a class="mui-tab-item" href="login.html">
            <span class="mui-icon mui-icon-gear"></span>
            <span class="mui-tab-label">会员中心</span>
        </a>
    </nav>
    <script src="assets/zepto/zepto.min.js"></script>
    <script src="assets/mui/js/mui.min.js"></script>
    <script src="js/base.js"></script>
    <script src="js/detail.js"></script>
    <script src="assets/artTemplate/template-native.js"></script>


    <script>
        //获得slider插件对象
        var gallery = mui('.mui-slider');
        console.log("轮播开始");
        gallery.slider({
            interval: 1000 //自动轮播周期，若为0则不自动播放，默认为0；

        });
    </script>
    <!-- <%for(let  i=0;i<result.length;i++){%>
        <%}%> -->
    <script type="text/template" id="detailTpl">
        <%if(!pic||pic.length===0) {%>
            pic=[{"picAddr":"/shopping/images/none.png"}];
            <%}%>
                <div class="mui-slider">
                    <div class="mui-slider-group mui-slider-loop">
                        <!--支持循环，需要重复图片节点-->
                        <div class="mui-slider-item mui-slider-item-duplicate">
                            <a href="#"><img src="<%=pic[pic.length-1]%>"></a>
                        </div>

                        <%for(let  i=0;i<pic.length;i++){%>
                            <div class="mui-slider-item">
                                <a href="#"><img src="<%=pic[i].picAddr%>" /></a>
                            </div>
                            <%}%>
                    </div>
                    <!-- 点点点控制器 -->
                    <div class="mui-slider-indicator">
                        <%for(let  i=0;i<pic.length;i++){%>
                            <div class="mui-indicator mui-active"></div>
                            <%}%>
                    </div>
                </div>
                <p class="title">
                    <%=proName%>
                </p>
                <div class="price">
                    价格：
                    <span class="newPrice">￥<%=price%></span>
                    <span class="oldPrice">￥<%=oldPrice%></span>
                </div>
                <div class="size">
                    尺码：
                    <%var size=size.split('-')%>
                        <% for(var i=size[0];i<=size[1];i++){%>
                            <span><%=i%></span>
                            <%}%>
                </div>
                </div>
                <div class="num">
                    数量：
                    <main>
                        <span id="minus">-</span>
                        <input type="text" id="num" value="1">
                        <span id="plus">+</span>
                    </main>
                    <span class="margin">剩余：<%=num%></span>
                </div>
                <div class="productDetail">
                    详情：描述
                </div>
                <div class="operate">
                    <div class="cart">
                        <a href="#" class="fa fa-shopping-cart"></a>
                    </div>
                    <div class="btns">
                        <a class="addCart" href="javascript:addCart()">加入购物车</a>
                        <a class="buy">立即购买</a>
                    </div>

                </div>

    </script>
</body>

</html>